home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / Storage / Bento / SURef.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  1.3 KB  |  70 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SURef.h
  3.  
  4.     Contains:    SURefKeeper header
  5.  
  6.     Written by:    Vincent Lo
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <1>     1/26/95    VL        first checked in
  13.     To Do:
  14.     
  15. */
  16.  
  17. #ifndef _SUREF_
  18. #define _SUREF_
  19.  
  20. #ifndef _ODTYPES_
  21. #include <ODTypes.h>
  22. #endif
  23.  
  24. #ifndef __CM_API__
  25. #include <CMAPI.h>
  26. #endif
  27.  
  28. //==============================================================================
  29. // Classes defined in this interface
  30. //==============================================================================
  31. class SURefKeeper;
  32.  
  33. //==============================================================================
  34. // Classes used by this interface
  35. //==============================================================================
  36. class CMStorageUnit;
  37.  
  38. class SURefKeeper
  39. {
  40. public:
  41.  
  42.     SURefKeeper(CMStorageUnit* su);
  43.     
  44.     ~SURefKeeper();
  45.     
  46.     void Internalize();
  47.     
  48.     void Externalize();
  49.  
  50.     void GetNextSURef(ODStorageUnitRef ref, ODBoolean strong);
  51.     
  52.     void Reset(ODStorageUnitRef ref);
  53.     
  54.     ODBoolean IsWeakSURef(ODStorageUnitRef ref);
  55.     
  56.     ODBoolean IsStrongSURef(ODStorageUnitRef ref);
  57.     
  58.     void InvalidateSURef(ODStorageUnitRef ref);
  59.     
  60.     ODBoolean IsValidSURef(ODStorageUnitRef ref);
  61.  
  62. protected:
  63.  
  64.     CMStorageUnit*    fSU;
  65.     ODBoolean        fDirty;
  66.     ODULong            fCurrentSURef;
  67. };
  68.  
  69.  
  70. #endif // _SUREF_